#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int input = 0;
    int seconds = 0;
    int minute = 0;
    int hour = 0;
    scanf("%d", &input);
    seconds = input % 60;
    minute = (input / 60) % 60;
    hour = input / 3600;
    printf("%d %d %d", hour, minute, seconds);

}